<template>
<div class="container">
 <el-pagination
      :background='background'
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="page"
      :page-sizes="[10, 20, 30, 40]"
      :page-size="size"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total">
    </el-pagination>
</div>
</template>

<script>
export default {
  props: {
    page: {
      type: Number
    },
    size: {
      type: Number
    },
    // dataLsit: {
    //   type: Array
    // },
    total: {
      type: Number,
      required: true
    },
    background: {
      type: Boolean,
      default: true
    }
  },
  data () {
    return {

    }
  },
  methods: {
    handleSizeChange (val) {
      this.$emit('handleSizeChange', val)
    },
    handleCurrentChange (val) {
      console.log(val)
      this.$emit('handleCurrentChange', val)
    }

  }
}
</script>

<style scoped>
* {
      font-family: 'Avenir', Helvetica, Arial, sans-serif;
}
.container {
  width: 100%;
  float: left;
  margin-top: 5px;

}
.container .el-pagination {
  float: right;
}
/* .container .el-pagination.left {
  float: left;
} */
</style>
